<style scoped>
.div1 {
  width: 100%;
  height: 150px;
  position: relative;
}
.div1 img {
  width: 100%;
  height: 100%;
}
.div2 {
  width: 100%;
  height: 26px;
  position: absolute;
  top: 10px;
}
.van {
  font-size: 26px;
  color: rgb(255, 255, 255);
  float: left;
  transform: translateX(10px);
}
.inp {
  width: 60px;
  height: 26px;
  border: 1px solid white;
  background-color: transparent;
  color: white;
  line-height: 26px;
  border-radius: 16px;
  float: right;
  transform: translateX(-10px);
}
.div3 {
  width: 90%;
  margin: 30px auto;
}
.div4 {
  width: 100%;
  height: 55px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  color: #444444;
}
.va,
.va1 {
  font-size: 26px;
  color: #444444;
}
.div4 input {
  width: 70%;
  border: none;
}
.div5 {
  width: 100%;
  height: 55px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  color: #444444;
}
.inp1 {
  border: none;
  width: 78%;
}

.div6 {
  width: 100%;
  height: 42px;
  line-height: 42px;
  font-size: 12px;
  color: #444444;
}
.inp3 {
  width: 100%;
  height: 42px;
  margin-top: 40px;
  text-align: center;
  line-height: 42px;
  border: none;
  background-color: #d0011b;
  color: white;
}
.div7 {
  width: 100%;
  margin-top: 10px;
  overflow: hidden;
}
.div7 p {
  line-height: 16px;
  font-size: 12px;
}
.div7 p:nth-of-type(2) {
  color: rgb(108, 108, 243);
}
.div8 {
  width: 60%;
  height: 32px;
  border-radius: 20px;
  background-color: rgb(108, 108, 243);
  text-align: center;
  color: white;
  display: flex;
  align-items: center;
  margin: 60px auto;
}
</style>


<template>
  <div>
    <div class="div1">
      <img src="../../assets/img/1001.jpg" />
      <div class="div2">
        <van-icon class="van" name="close" @click="fn" />
        <input class="inp" type="button" value="注册" @click="fn1" />
      </div>
    </div>
    <div class="div3">
      <div class="div4">
        <van-icon class="va" name="graphic" />
        <span>+86&nbsp;&nbsp;丨</span>
        <input type="text" placeholder="请输入用户名/手机号" />
      </div>
      <div class="div5">
        <van-icon class="va1" name="question" />
        <span>丨</span>
        <input class="inp1" type="text" placeholder="请输入密码" />
      </div>
      <div class="div6">账号密码登录</div>
      <input class="inp3" type="button" value="登  录" />
      <div class="div7">
        <p>登录即表示你已阅读并同意</p>
        <p>有货用户服务协议 有货隐私条款</p>
      </div>
      <van-cell
        class="div8"
        title="选择其他登录方式"
        @click="showShare = true"
      />
      <van-share-sheet
        v-model="showShare"
        title="选择登录方式"
        :options="options"
        @select="onSelect"
      />
    </div>
  </div>
</template>

<script>
import { Toast } from "vant";

export default {
  data() {
    return {
      showShare: false,
      options: [
        { name: "QQ", icon: "qq" },
        { name: "微信", icon: "wechat" },
        { name: "微博", icon: "weibo" },
        { name: "二维码", icon: "qrcode" },
      ],
    };
  },
  methods: {
    onSelect(option) {
      Toast(option.name);
      this.showShare = false;
    },
    fn() {
      this.$router.push("/");
    },
    fn1() {
      this.$router.push("/newuser");
    },
  },
};
</script>

